package com.wedo.mall.entity;

import android.content.Intent;

import com.wedo.mall.R;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lxy on 2017/6/10.
 */

public class Category {
    public String img;
    public int icon;
    public String name;
    public Intent target;

    public Category() {
    }

    public Category(int icon, String name) {
        this.icon = icon;
        this.name = name;
    }

    public static Category with(int icon, String name){
        return new Category(icon,name);
    }


    public static List<Category> categories(){
        List<Category> categories = new ArrayList<>(8);
        categories.add(Category.with(R.drawable.home_dq,"电器"));
        categories.add(Category.with(R.drawable.home_hotel,"酒店"));
        categories.add(Category.with(R.drawable.home_hd,"花店"));
        categories.add(Category.with(R.drawable.home_xc,"修车"));
        categories.add(Category.with(R.drawable.home_ms,"美食"));
        categories.add(Category.with(R.drawable.home_sg,"水果"));
        categories.add(Category.with(R.drawable.home_sx,"生鲜"));
        categories.add(Category.with(R.drawable.home_gd,"更多分类"));

        return categories;

    }
}
